Software developments have become increasingly large, diverse and complex in recent years. Because of this, extending the life-span of software has become a challenging problem. For example, object-oriented technology offers one solution. By improving the modularity and readability of software it helps us to understand the structure of the software and to maintain, modify and extend it. Various techniques can be used for learning from existing software and such techniques used commonly are adapted to learn various aspects of the software itself and the stages involved in the software development. A commonly used method of learning includes drawing conclusions by users, which includes programmers, designers, testers etc., from what has been done with a particular software especially when similar situation are encountered. Such learning leads to drawing conclusions and/or opinions before implementing any new software development or making any improvements to existing software. Moreover, in the filed of learning, technology has entered a phase of intense work on standardization of learning technology descriptions of various kinds.
For example design patterns are used to overcome this problem. Design patterns are abstract descriptions of object-oriented designs which appear repeatedly and which have succeeded as solutions to past design problems. They are useful in achieving flexible and extensible design which makes it easy to make future changes and modifications. However disordered application of design patterns to a piece of software often makes its design complicated and reduces its performance.
An embodiment of a method and apparatus for modular reordering of portions of a computer program based on profile data is disclosed in U.S. Pat. No. 6,029,004. A global call graph is initially constructed from profile data. From the information in the global call graph, an intramodular call graph is generated for each module. Reordering techniques are used to reorder the procedures in each module according to the profile data in each intramodular call graph. An intermodular call graph is generated from the information in the global call graph. Reordering techniques are used to reorder the modules in the computer program. By reordering procedures within modules, then reordering the modules enhanced performance is achieved without reordering procedures across module boundaries. Respecting module boundaries enhances the maintainability of the computer program by allowing a module to be replaced without adversely affecting the other modules. Such compiler optimizations of a program sequence generally involve building a directed acyclic graph (DAG) or a dependence graph a single class or interface is not addressed.
A systematic methodology is therefore required to effectively construct flexible and extensible software. Without a way to improve the method for learning from existing software by a dynamic call graph for creating probable protocol state machines for classes and interfaces, the promise of this technology may never be fully achieved.